package com.example.buffertest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;

/*
设置启动参数，设定网络视频的url地址和本地缓存的地址
*/
public class VideoViewDemo extends Activity{
	 @Override
	    public void onCreate(Bundle icicle) {
	    super.onCreate(icicle);
	 
	    //String url = "http://carey-blog-image.googlecode.com/files/vid_20120510_090204.mp4";
//	    String url = "http://nb.baidupcs.com/file/38a9d33827787859eb19dfd1d4760416?bkt=p2-nb-219&fid=2552552015-250528-190170155040837&time=1425111736&sign=FDTAXERLBH-DCb740ccc5511e5e8fedcff06b081203-kCo1wUgJqPFRNcYqJnokyh1BmDc%3D&to=nbb&fm=Nin,B,U,nc&newver=1&newfm=1&flow_ver=3&sl=83034191&expires=8h&rt=pr&r=137993809&mlogid=1267773974&vuk=2552552015&vbdid=2371045942&fin=20150213165252.mp4&fn=20150213165252.mp4";
	    String url = "http://lx.cdn.baidupcs.com/file/03b85233355374f137c605b783879f22?bkt=p-09be788ae8143ff82f26ae944b3ee426&xcode=3a21c279628604f7717199eef97e43f1bf7eedebc49557e1ae97ca166f54709c&fid=235817282-250528-526648561&time=1425116151&sign=FDTAXERLBH-DCb740ccc5511e5e8fedcff06b081203-31RLd%2FyDipJPXSd7ddOhSJ9UtzI%3D&to=hc&fm=Nan,B,U,nc&sta_dx=129&sta_cs=1195&sta_ft=avi&sta_ct=7&newver=1&newfm=1&flow_ver=3&sl=83034191&expires=8h&rt=sh&r=131661301&mlogid=848254759&vuk=2552552015&vbdid=2371045942&fin=01%E3%80%8A%E8%80%81%E7%BD%97Android%E5%BC%80%E5%8F%91%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B%E3%80%8B%E7%AC%AC%E4%B8%80%E9%9B%86%EF%BC%9A%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%E6%90%AD%E5%BB%BA%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83.avi&fn=01%E3%80%8A%E8%80%81%E7%BD%97Android%E5%BC%80%E5%8F%91%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B%E3%80%8B%E7%AC%AC%E4%B8%80%E9%9B%86%EF%BC%9A%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE%E6%90%AD%E5%BB%BA%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83.avi";
	 
	    Intent intent = new Intent();
	    intent.setClass(VideoViewDemo.this, BBVideoPlayer.class);
	    intent.putExtra("url", url);
	    intent.putExtra("cache",
	            Environment.getExternalStorageDirectory().getAbsolutePath()
	                    + "/BufferTest/" + System.currentTimeMillis() + ".mp4");
	    startActivity(intent);
	 }

}
